#!/usr/bin/env python3
# -*- coding: utf-8 -*-

'正则表达式的编译'

import re

if __name__ == '__main__':
    compile = re.compile(r'(\d{3})-(\d{3,8})')
    if compile.match('012-12345'):
        print(True) # True
    else:
        print(False)